Log In  
BBS > Lexaloffle Community Superblog
This is a combined feed of all Lexaloffle user blogs. For Lexaloffle-related news, see @zep's blog.

All | Following | PICO-8 | Voxatron | General | Off-site
[ :: Read More :: ]

Cart #clipmaster-0 | 2022-01-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

I'm going to keep a running total of what gets blocked in Pico-8 or cannot be accessed and - as access is desirable, I'll put it as a task to add to Clipmaster so it can be run in Pico-8. So not now but this thread will get updated and often.

The two commands import() and export() do not even work online.

The command, ls and dir (same command) do not do anything in code, I remember a time they used to work, however. I could add that to Clipmaster, give you a proper directory with extensions, file sizes, etc.

There is no sortarray() command. Blitz has a very fast and robust internal sort routine. This could be added to Pico-8.

** There are no large integers, not easily. So, yeah Blitz could dip down and give us quadruple floating point accuracy or internal 64-digit integers. I know we need this ! :D

There is no loadtext() or savetext() This would be quite easy to add to Pico-8.

There is no deletefile() command. While not very useful as you can only use printh() to save to new text files, it would be useful if it would check and only have it work for .txt files.

There is no inputh() where you can read from a text file directly to a variable or array. This would be useful to have and could be done.

... many ideas ... should keep me busy for a-while.

Having seen other Pico-8 carts making use of external programs that are not pico-8 got me to thinking:

"Can this be done with Blitz ?"

Yes it can. Having decided to use the clipboard as my driver, I can do all kinds of interesting things, not just audio. And it doesn't even need to be in the same directory as your Pico-8 program. Although when you bundle your program as a final EXE, you can consider doing so.

To download my Clipmaster, required for this example, use the following address from Google Drive:

https://drive.google.com/file/d/1wUFty36AAHdKVNwHfMMYHKUOL25xKtXJ/view?usp=sharing

Click the down-facing arrow in the top-right-hand corner of the screen, don't clip Zip Extractor. Use 7zip to unpack if need be. Nice Freeware for unpacking ZIP files.

https://www.7-zip.org/a/7z2107-x64.exe

Run the program from there. Clipmaster 01-08-22.exe

With the EXE running, In this particular cart, press 🅾️ to play a unique sound effect that is impossible for regular pico-8 to play. And press ❎ to jump to my main website, all controlled inside Pico-8. See the source.

While it's still pretty primitive, it does open the option for useful items such as, in this case, playing audio sound effects such as WAV and OGG, even music, and a webpage launcher.

Likely there can be many more tasks and things that could be added to it, send me some suggestions and I'll see what can be coded, with your credits for the suggestion if included. :)

With the EXE running, In this particular cart, press 🅾️ to play a unique sound effect that is impossible for regular pico-8 to play. And press ❎ to jump to my main website, all controlled inside Pico-8. See the source.

From there, as long as you are running the cart in immediate mode, from EXE, or from Splore, it should work just fine. You can test it Online but must press CTRL+V each time, rather defeating the purpose of it. In immediate, EXE, or Splore, you won't need to though.

If there's interest, I should be able to add channel ability so you could fade music in on a channel and fade it out just as neatly. printh("@mus fi 01 logo.ogg","@clip") which would fade in the music logo.ogg and record its ID on channel 01. So to fade it out you could use printh("@mus fo 01","@clip")

Once you have Clipmaster running, to shut it down select it and press the Q key to exit.

This is exciting territory for me. I will be working here especially determining how BLITZ can assist with data files, load/save/update/delete. I'll limit the system to work only with .TXT and .PNG, nonetheless this opens interesting data opportunities that Pico-8 cannot follow.

As always if you have any questions or comments, please feel free to add them below.

P#104586 2022-01-09 00:46 ( Edited 2022-01-09 02:40)
[ :: Read More :: ]

Cart #trilatscavenger-0 | 2022-01-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

This is my first game on the Pico-8. It took around 10 hours to complete. I learned lots of Lua in the process! :)

Any comments and suggestions are welcome.

Enjoy!

P#104587 2022-01-09 00:18 ( Edited 2022-01-09 00:20)
[ :: Read More :: ]

Cart #squaringthecircle-0 | 2022-01-08 | Code ▽ | Embed ▽ | No License
7

P#104572 2022-01-08 21:02
[ :: Read More :: ]

Cart #giyowakehi-0 | 2022-01-08 | Code ▽ | Embed ▽ | No License


There are multiple issues I can't seem to figure out such as:
Why isn't the text coming up during the "cutscene" unless I manually set the state="cutscene"
I can't change the spawn point after the cutscene
why do I need to talk to piggy twice after I collect all his apples

I think I'm somehow setting the text on the screen to inactive and I'm not sure how

~Any and all help is greatly appreciated thanks!~

P#104568 2022-01-08 20:40 ( Edited 2022-01-08 21:24)
[ :: Read More :: ]

Hi everybody,

Here is my first cart, a version of Conway's Game of Life.

I hope you'll like it :)

Cart #this_is_no_qr_code-0 | 2022-01-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

P#104554 2022-01-08 18:19
[ :: Read More :: ]

Cart #sonic1_specialdemo-2 | 2022-01-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

This is a small work-in-progress demo thingy that tries to imitate the way special stages in the first Sonic game work.

Is very unfinished and probably very buggy.

Changelog:

Current version:

  • Added the special stage music, as composed by Gruber.
  • Modified the check for whether the character is in the air by only checking sensors that are close to the ground.
  • Fixed a rounding bug that resulted in in-air checks failing half of the time on walls facing two of the four directions.
  • Debug functionality: the background is changed from blue to purple whenever the main character is in the air.

Version 2:

Cart #sonic1_specialdemo-1 | 2022-01-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

  • Replaced manual scrolling with automatic one
  • Implemented the R block functionality
  • Made it possible to move the character with the directional pad (slower in air than on ground).

Version 1:

Cart #sonic1_specialdemo-0 | 2022-01-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

P#104548 2022-01-08 15:50 ( Edited 2022-01-10 18:08)
[ :: Read More :: ]

Cart #chickndoggo-0 | 2022-01-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
9

Press X! (Also try holding it...)

About

Chick'n'Doggo is a game I made as part of the GMTK Game Jam 2021 using Pico-8. This is an updated version with some minor fixes, mostly regarding collision as well as some slightly adjusted controls (try holding the button). There's still more to be done, including the, perhaps not so minor, flaw of missing sound, so this version may be updated in the future.

P#104547 2022-01-08 15:15
[ :: Read More :: ]

Cart #pakupaku_maze-5 | 2022-01-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
10

1.13 Update


New: The game now has Mode A and Mode B. In Mode A, Paku-paku will continue to travel in the same direction until it hits a collision. When a user gives vertical input while Paku-paku is traveling horizontally, it will continue moving horizontally until it comes to an intersection where it can turn vertically. In short, this is closer to the original Pac-Man. Mode B is the same as before, Paku-paku will only move when an input is given, and will come to a stop when there is none.

I thought about this and it came to my mind that since the game looks so similar to Pac-Man, players would also expect it to play like Pac-Man. So I felt like an option should be there. Mode A feels more fluent when turning corners as a result, whereas Mode B still makes it easier to ambush the ghost by camping next to a power pellet. As a result of this change, the game now saves 8 high scores, 4 for each ending multiplied by two modes.

New: There is only one key and its spawn position is now randomized. After repeated test plays I inevitably came to know where things are by heart, and I realized that I placed the keys too close to the exits, making 70% of the play field pointless to visit in any given run. Sure, I didn't want to make the game too hard, but maybe this was made too easy. Although there's only so many rooms to explore, I think this can still be a tad frustrating so here are the room coordinates where the key can spawn.

(5,1), (2,1), (6,1), (3,2)

Fix: The door bug is now fixed. After a bit of fiddling I gave up and decided to hard-code door coordinates, so all four doors open when there's no pellet and Paku-paku has a key.

1.12 Update

  • The About page is updated to have a simple sprite animation to explain the game flow.
  • Known issue: the exit door at (3,0) is open when Paku-paku enter the room with a key, and it can be entered to see the ending. There might be other bugged exits.

1.11 Quickfix

  • The player can turn corners more easily. If the player is one pixel short of being able to move, it will just move player so they can turn. Getting caught in the corner can still happen if the player is off by two or more pixels, but I hope it's a little better than before.
  • The walls better represent collision. The discrepancy between the visual representation and box collision definitely made the experience worse.
  • Fixed another oversight, the game was trying to move player diagonally which resulted in the player facing downward when moving left when the analogue stick was pointing down-left, for example. Now the player only faces the direction it's heading.
  • The ghost will blink for 45 frames (1.5sec) before the power pellet effect runs out and it becomes dangerous again.

I'm still thinking of how I could make its movement a little more fluent. Hmmm...

About

Pakupaku Maze is a dungeon crawler, starring a legendary hero who was cursed by the evil demons to become a yellow circular blob that is unable to leave any room unless he eats all the cookies that are on the floor. Alternatively, you might say it's a Pac-Man clone.

The game's based on an idea I had several years ago, what if Pac-Man can leave this maze and explore other areas. It was a pipe dream at the time, but now I can make it and see how it turns out. The entire game is made of 30 screens, and there is one key and four exits which lead to different endings. Don't worry, the key will work on any door. The game will save four high scores for each ending.

There's only one ghost, and this ghost isn't as smart as the original Pac-Man ghosts because I wrote its AI. I was too confused reading about A* and felt it could bog me down for days if not weeks, so I prioritized finishing the game with what I can write. I thought hard about adding a second ghost, but having a second ghost would crowd the screen too much and make the game too difficult.

Player's starting location is randomly chosen among 5 possible options, which I hope would extend the game's expiry date. I'm quite pleased with the end result here, and it's my first game that's not built off from a tutorial project. One day I'll do a Pac...no, Paku-paku Roguelike with randomly generated mazes...

And yes, it's possible for Pac-..no, Paku-Paku to go transgender during the game. Well, there's an item that puts a bowtie to make it look like Ms Pac-Man.

P#104528 2022-01-08 05:56 ( Edited 2022-03-06 23:36)
[ :: Read More :: ]

On a fresh boot of pico-8, this glitchy grid effect happens exactly once, the first time that secret colors are used in a screen palette. Then never again.

I discovered this in my latest cart, and was wondering if this is an intentional indicator of "hardware mode change", or a bad sign that something is going seriously wrong. The starting palette of this cart uses only normal 0-15 colors, as does the "raw" palette you see when you press up. However, every other palette will show this glitch once for about 0.5 seconds, before the screen returns to normal. Re-running the cart does not show it ever again, until you reboot pico-8 completely.

Using if(pi==3) poke(0x5f2e,1) stop() poke(0x5f2e,0) at the end of the _draw function means that the effect will happen for the same amount of time without any game code running at all, which makes me think that this visual glitch is intentional. Note also that without the poke to make the screen palette persist in the editors, there is no glitch effect, likely because it doesn't flip() with secret colors active. Any idea why this is happening, @zep?

P#104519 2022-01-08 02:51
[ :: Read More :: ]

Cart #yabadopuwo-2 | 2022-01-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

Hello there!

Here's my first PICO-8 project, Flap Evolved. It's a really terrible Flappy Bird clone, but it is playable. It was a great project to start my PICO-8 journey out on.

Player Mode (X):
Take control of a really ugly bird and try not to fly into pipes. That's about it. Every 4 pipes passed increases the speed.

Neural Network Mode (Z):
Tired of playing already? Yeah, ditto. Why not watch a population of neural networks evolve over time to learn how to play, instead?
The neural network is pretty basic, but it does support multiple hidden layers and has a basic genetic algorithm included, for all your evolutionary needs.

I'm still learning Lua & PICO-8, but having a blast so far. Thanks for taking the time to read and have a good one!

Cheers,
Taco

v1.1:
-Improved graphics
-Removed jump delay
v1.2:
-Increased jump amount for added difficulty, adjusted "physics"
-Improved game instructions
-NNs now see the_pipe.x
-NNs now see pipe_speed
v1.3:
-2 pipes will now appear on screen at a time, refactored pipe "system"
-Increased starting pipe stats to make it easier at the start
-Every 4 pipes cleared, pip gap becomes smaller, distance between pipes becomes shorter, and the y position jump becomes larger
-Fixed a couple of crash bugs from OOB arrays
-Agents now get additional points from clearing a pipe, instead of just points per frame
-Agents see the closest 2 pipes to them. Pipe x, topY, and bottomY are visible for both pipes
-Increased mutation chance
-Added a fitness graph that shows the average fitness over the last 20 generations

P#104518 2022-01-08 02:29 ( Edited 2022-01-08 23:57)
[ :: Read More :: ]

Alright so my new Razer Kishi finally arrived.

Basically it is a clamp that fits on the left and right side of your cellphone. And it does work with Pico-8 from Firefox, sort of. The arrow keys are the rolling joystick at the top, which is not what I want. I want it to work with the arrow keys beneath that.

Is there some way I can remap these keys in Pico-8 from Firefox so they use the standard 4-way arrows ?

P#104510 2022-01-07 23:32 ( Edited 2022-01-08 20:24)
[ :: Read More :: ]

Cart #cliffside2-1 | 2022-01-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
23

A mod for Celeste Classic 2, featuring new levels, mechanics, a remixed soundtrack, and more!

A sequel to Cliffside.

Download standalones here.

Update 1.1: Fixed momentum bug with springs. Small level tweaks. Fixed intro sfx.

P#104501 2022-01-07 21:54 ( Edited 2022-01-08 04:15)
[ :: Read More :: ]

Hey all! I'm new to Raspberry Pi and Linux so I apologize if this is a simple fix, I couldn't find it anywhere. I downloaded the Raspberry Pi Pico8, unzipped it (doesn't matter where it all has the same error) and when I try to run Pico8 I get:

Failed to execute child process "~/pico-8/pico8" (No such file or directory)

All the other files work in the folder like the manuals and such, but pico8 won't run.

Any help would be great, thanks!

P#104488 2022-01-07 19:14
[ :: Read More :: ]

Cart #gamelauncher-13 | 2022-01-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
53

NOTE: this is NOT finished, I am just posting an alpha

if you want to see a cart added, post it here

https://www.lexaloffle.com/bbs/?tid=46086

press down arrow to enable key controls, up arrow to disable them

all games:


platformer:
celeste (+old site +farland )
alex kidd in pico world
snack scoffer
u-turn

metroidvania:
METROcubeVANIA (+the bee movie +metrocubevania png )

racing:
picoracer-2048

shoot'em-up:
picobreed

horror:
the dead should die

rhythm:
pico night punkin' (+jo560hs mod collection )

sandbox:
terra
picovox

fps:
picohot
poom

strategy:
pico zombie garden

arcade:
picoware
marballs 2
peral
he get up

updates


goals:

added the all games category
main menu

S̘͈̣ͫͨ̄͢ê̶̜̫̺͍͍̯ͧ̃̋c̵̳̗̣̑r̼̳͎͎͓͙̪͔͒͌̐̕ȇ̡̮̗͙͎̗ͅt̡̲͕̲̗̄͆s̸͔͔̈́̂̿

FYI:
Clicking the pico-8 logo does nothing...

Also, Comments about the launcher in general or really anything other than requests are fine.

P#104486 2022-01-07 19:01 ( Edited 2022-01-19 17:10)
[ :: Read More :: ]

Cart #honks_of_the_southern_isles-8 | 2024-01-20 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
9

In this Untitled Goose Game inspired demake, play as Honks the Goose and explore your tropical domain.
Complete a variety of tasks and make the isles a better place.
Features 2 endings, based on your interpretation of the 6th task.
Feedback is welcome!

Music is by Robby Duguay, you can find it yourself here: https://www.lexaloffle.com/bbs/?pid=15487#p

P#104477 2022-01-07 16:50 ( Edited 2024-01-20 21:56)
[ :: Read More :: ]

by shy
Cart #aaconv-4 | 2022-01-08 | Code ▽ | Embed ▽ | No License
14

I was reading up on Bit Arrays to learn more secret bitwise knowledge, and stumbled onto a very clever way to count bits, via Hamming weights and a magic multiplication number. Short story is that this led to efficient fullscreen Anti-Aliasing for 1-bit screen data (colors 0 and 1 only).

Other convolution shaders are easily doable with similar techniques. This one takes every pixel and adds weighted amounts of the neighbors in this way:

 1
131
 1

You might be able to do gaussian blurs with a larger sampling neighborhood, or things like Conway's Game of Life. I'm really surprised how efficient some of these techniques are, even on pico-8. Counting every single 1 in the entire screen data is only ~6% CPU @ 30fps.

UPDATE

I cleaned up the interface, added color palettes, and optimized a bit, so this should be finished now. Managed to get a super-optimized version of the AA working via loop unrolling, but also added @Felice 's adjustment to the version with fewer tokens. There's a secret demo-like effect to play around with now too, discovered via offset bugs. Calling this experiment done!

.

UPDATE 2

Wanted to test the limits of optimization, at the cost of tokens. Original AA function is 101 tokens, faster version is 434, fastest version is 1397, but officially runs twice as fast! (9% CPU at 30fps) I don't think I can push this idea any further, and there are diminishing returns, so the middle speed is probably the best choice in most cases.

UPDATE 3

Very slight changes based on @freds72's optimization suggestion. Times and token counts are down across the board!

UPDATE 4

3%CPU@60fps improvement to the middle function for +30 tokens (or a 1% improvement for -24 tokens, commented out in the code). The max speed function becomes less relevant!

P#104468 2022-01-07 14:14 ( Edited 2022-01-08 18:38)
[ :: Read More :: ]

Cart #bc251-0 | 2022-01-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

My first game made in PICO-8. Mostly was made for a Discord server I'm part of and includes a number of inside jokes but figured it was worth sharing.

Use arrow keys for movement and O+X can be used in place of Up/Down. Collect burgers and avoid rocks. Score multiplies the more burgers you can catch in one jump.

P#104454 2022-01-07 07:48 ( Edited 2022-01-07 07:52)
[ :: Read More :: ]

Cart #grandmaster_checkers-0 | 2022-01-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
12

This is my crack at a checkers game with a juicy UI.
Can you beat the GrandMaster CPU?
Higher levels are still a little slow, especially in the endgame.
Enjoy!

Potential Updates

  • actually implement the settings menu...😅
  • Use a transposition table to speed up the AI. I actually already tried this, but immediately ran into memory issues. If I were to re-implement it, I would need a good algorithm for deciding which table entries to purge when the memory starts getting full.
  • Restrict the cursor to only pieces that can move (when no piece is selected), and only moves that the selected piece can make (when one is). This was recommended by @ChristopherD who played the game while it was WIP. You can view my response to that below.
  • MoAr PaRtIcLeS...I had planned on having a starfield or some shapes moving around in the background, as well as a bit of dust coming up around the pieces when they land after making a move. I implemented the former, but took it out because I thought it added too much visual noise. If you think it would cool to see in the game, please let me know. I have plenty of tokens left for more of this kind of juice. 👍

Change Log


V1

  • Jumps are now mandatory, as per the official checkers rules
  • Added sound
  • Updated AI (includes 3 more levels)
  • Animations are somewhat smoother

V2

  • Hotfixed a sound glitch that made the game nigh unplayable

V3

  • Improved AI speeds slightly
  • Show available actions at the bottom of the screen
  • Show jumped pieces on the sides
  • Show opponent level while playing
  • Added Pause menu
  • More sound fixes

V4

  • Recognizes draw by threefold repetition
  • Improved AI endgame strategy
  • Added Take Back last move option in Pause menu
  • AI now runs on a coroutine (i.e. game shouldn't freeze)
  • Added proper title screen
  • Show what move the AI is considering
  • Added a few miscellaneous sounds and effects
P#104444 2022-01-07 03:07 ( Edited 2022-01-16 02:58)
[ :: Read More :: ]

Hey,

I am fully aware that Pico-8 does not have an android release
It does however have compiled linux binaries for x86_64 (amd64) and arm64 (aarch64)

Knowing I can't actually execute these binaries in "native" android, I started experimenting with proot-distros
I've had success running linux binaries in proot before, namely with titles like Dwarf Fortress using this person's research here:
https://www.reddit.com/r/dwarffortress/comments/r80m7y/dwarf_fortress_mobile_running_dwarf_fortress_on/
TL:DR proot debian, fill in required libraries, disable video/sound, force text rendering, launch linux binaries via box64

Obviously I can't force text rendering for pico-8 (although that would be baller if it could output to terminal using filled unicode characters and the already primitive color palette of a terminal window)
As such, my setup is similar but tweaked.
Its still a proot distro, all the libraries it claims to need are present, but I have the graphical interface piped through VNC or XSDL.

However, launching either the arm64 binary or the amd64 binary (via box64) results in the same error

SDL Error: Could not initialize UDEV

** FATAL ERROR: Unable to initialize SDL

I've compiled SDL from source in every configuration I can find, i've found virtualized distros that claim SDL support on older versions of android... Heck I even got openGL running with hardware acceleration. All I can think of is that I am misunderstanding what part of UDEV isn't initializing.
Is it failing to initialize the GPU rules? Sound rules? Input rules? I can't figure that out and that error is the full extent of the log file that I have.

I know its not strictly an Android issue as I've seen the threads where chromeOS people have successfully run Pico-8 on chromebooks using very very similar methods, but it looks like an arm64 android issue.

P#104423 2022-01-06 20:41 ( Edited 2022-01-06 20:51)
[ :: Read More :: ]

Cart #tcurve-2 | 2024-03-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
20

I’ve been curious why smooth, textured curves were never a thing in graphics. Usually just polygons, or curves made out of polygons. After I saw this video on bezier curves, https://www.youtube.com/watch?v=aVwxzDHniEw thought I had enough tools to figure out why for myself. The video mentions two major difficulties when working with them: It’s hard to solve cubic polynomials, and estimating distance along a bezier curve isn’t precise.
If your goal is texturing them, it turns out you don’t even need to estimate distance. For any 2 bezier curves, they all share a start t value of 0 and an end t value of 1. You just have to scale up whatever t value you’re on to the height of your texture and draw your tline(), and it looks great!

The inability to solve cubic polynomials was tricky. Stack overflow has methods for drawing curves. I can’t quite figure them out, but they appear too slow for pico 8 and take a bit of space. Originally, I would just guess a T value and see if it was one pixel away, and go to the next one. Then I saw this video on newton's method https://www.youtube.com/watch?v=hHeq-SB8uVg
Which still uses guessing, but no checking and guessing again. And, if your first guess is close enough, you don’t even need to have a guess loop! I tried to put something together for that. Wowzers, you have to be really careful on how you approach +/- infinity. I had to precompute all the noteworthy points (the 2 local extrema, and the point in between) Newton's method acts up in areas of low velocity, so, I always approach the local extrema from t0, t1, or the time in between the extrema. (unless the point in between is starting to become a point of low velocity) When this cubic bezier function works, it’s such a nice smooth curve. I have it up on demo slide 2.

Picture generated in google using this equation: x-(393 x^3 +-552x^2+252x-39)/(3393x^2 + 2-552*x+252)

You can see when guesses start to go haywire. Newton's method is very delicate but very powerful for this sort of application

I also put together a quadratic(t^2) bezier function to compare with the cubic(t^3) one :

  • A cubic function forming an “S” shaped curve is faster than 2 “C” shaped quadratics glued together making an S shape, but…
  • There is now a whole lot of setup code for the cubic function, making it as long or longer than the solutions on stack overflow.
  • The cubic bezier still uses a bit more of the cpu when zoomed out, but the quadratic scales down nicely. I think I would like to play games with several cool looping structures in the distance
  • Glitches remain in the cubic one. Possibly solved by using quadratic bezier functions inside of it.

I think I will shelve the Cubic bezier for now. The Quadratic using Newton's method is nice, compact and fast, and is mostly functional.

The next step is to figure out how to rasterize it quickly. Which will be challenging with these angled tlines. Right now this demo runs at 30fps because I draw a tline at every pixel change. I hope it could be efficient enough to have a super fast racing game at 60 fps. But, I’m getting burnt out working on this. I think I’ll take a step away for a while.

The step after that is projection. From what I understand about 3d graphics, all one would have to do is project the 2 3d quadratic beziers (their 4 start and end points, and 2 control points), and one should, in theory, have a splendid textured curve in 3d space!

The demo on slide 1 uses some mode 7 type tricks to make it look like the texture is moving and going into the distance. If anyone wants to use a texture in a more standard way, I put in the function draw_textured_quad_bez() at the end (and quad_bezier_newton() above it) that accepts 6 screen control points and map tiles x,y + width/height in tiles. It mostly works pretty well! A sample is on demo slide 3.

TL;DR curved polygons?

P#104413 2022-01-06 17:40 ( Edited 2024-03-26 14:08)
View Older Posts